<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .demo1,
        .demo3 {
            width: 200px;
            height: 30px;
            background-color: #6b6b70;
            float: left;

        }

        .demo2 {
            width: 400px;
            height: 300px;
            background-color: rgb(238, 220, 220);
        }
    </style>
</head>

<body>
        <div class="demo1">demo1</div>
        <div class="demo2">
            <!-- 文字不会被浮动的的demo1所覆盖就对了 -->
            bbbsnjckcnsdkcndsjcnkds
            ncjbjckdsnckscjdscdns
            cnkdsnckndccnjdscjd
            nsdjcnjsdncdscnjdscjj
            dncsdnkjcjscndsjk
        </div>
    <!-- demo3上一个元素demo2没有浮动  对齐demo2底部  如果demo2浮动的话 会对齐demo2顶部 -->
    <div class="demo3">demo3</div>
</body>

</html>